<script setup>
import chartsCompose from '@/composes/charts.js'
import { ref, onMounted, onBeforeUnmount } from 'vue'
import * as echarts from 'echarts'
const chartDom = ref(null)
const chartInstance = ref()
defineProps({
  type: {
    type: String,
    required: true,
  },
})
onBeforeUnmount(() => {
  chartInstance.value?.dispose()
  window.removeEventListener('resize', debouncedResize)
})
onMounted(() => {
  chartInstance.value = echarts.init(chartDom.value)
  console.log(chartDom.value, 222)
  // chartInstance.setOptions()
})
</script>
<template>
  <div ref="chartDom" class="chartDom">
    御剑乘风来,除魔天地间!===vue3==my-chart
  </div>
</template>
<style lang="scss" scoped></style>
